package com.game.worm.mobile.view.mine;

import android.view.View;
import com.dx.as.fragment.TFragment;
import com.game.worm.mobile.R;
import com.game.worm.mobile.view.mine.exchange.ExchangeActivity;
import com.game.worm.mobile.view.mine.setting.SettingActivity;

/**
 * Created by d_xxiang on 2018/3/27.
 */

public class MineFragment extends TFragment{
    @Override
    public void initView() {
        findView(R.id.update).setOnClickListener(onClickListener);
        findView(R.id.view_integral).setOnClickListener(onClickListener);
        findView(R.id.task).setOnClickListener(onClickListener);
        findView(R.id.record).setOnClickListener(onClickListener);
        findView(R.id.exchange).setOnClickListener(onClickListener);
        findView(R.id.favorite).setOnClickListener(onClickListener);
        findView(R.id.setting).setOnClickListener(onClickListener);
        findView(R.id.sign).setOnClickListener(onClickListener);
        findView(R.id.name).setOnClickListener(onClickListener);
        hideToolbar(true);
    }

    @Override
    public void onHiddenChanged(boolean hidden) {
        if (!hidden){
            hideToolbar(true);
        }
    }

    @Override
    public int setLayoutI() {
        return R.layout.fragment_mine;
    }

    @Override
    public void dataOpion() {

    }

    @Override
    public void initRpo() {

    }

    private View.OnClickListener onClickListener = new View.OnClickListener() {
        @Override
        public void onClick(View v) {
            switch (v.getId()){
                case R.id.update: //可更新
                    break;
                case R.id.view_integral://我的虫豆
                    break;
                case R.id.task://每日任务
                    break;
                case R.id.record://有奖试玩记录
                    break;
                case R.id.exchange://兑换提现
                    goToNewActivity(ExchangeActivity.class);
                    break;
                case R.id.favorite://我的收藏
                    break;
                case R.id.setting://设置
                    goToNewActivity(SettingActivity.class);
                    break;
                case R.id.sign://签到
                    break;
                case R.id.name://未登陆是，用做登陆
                    break;
            }
        }
    };
}
